/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.company.regis.db.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.math.BigInteger;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author totoland
 */
@Entity
@Table(name = "AMPHUR")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Amphur.findAll", query = "SELECT a FROM Amphur a")})
public class Amphur implements Serializable {
    private static final long serialVersionUID = 1L;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Id
    @Basic(optional = false)
    @Column(name = "AMPHUR_ID")
    private Long amphurId;
    @Column(name = "AMPHUR_CODE")
    private String amphurCode;
    @Column(name = "AMPHUR_NAME")
    private String amphurName;
    @Column(name = "GEO_ID")
    private BigInteger geoId;
    @Column(name = "PROVINCE_ID")
    private BigInteger provinceId;

    public Amphur() {
    }

    public Amphur(Long amphurId) {
        this.amphurId = amphurId;
    }

    public Long getAmphurId() {
        return amphurId;
    }

    public void setAmphurId(Long amphurId) {
        this.amphurId = amphurId;
    }

    public String getAmphurCode() {
        return amphurCode;
    }

    public void setAmphurCode(String amphurCode) {
        this.amphurCode = amphurCode;
    }

    public String getAmphurName() {
        return amphurName;
    }

    public void setAmphurName(String amphurName) {
        this.amphurName = amphurName;
    }

    public BigInteger getGeoId() {
        return geoId;
    }

    public void setGeoId(BigInteger geoId) {
        this.geoId = geoId;
    }

    public BigInteger getProvinceId() {
        return provinceId;
    }

    public void setProvinceId(BigInteger provinceId) {
        this.provinceId = provinceId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (amphurId != null ? amphurId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Amphur)) {
            return false;
        }
        Amphur other = (Amphur) object;
        if ((this.amphurId == null && other.amphurId != null) || (this.amphurId != null && !this.amphurId.equals(other.amphurId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.company.regis.db.entity.Amphur[ amphurId=" + amphurId + " ]";
    }
    
}
